<template>
  <div class="scheme_container">
    <div class="BAC-title" style="height: 68px;font-size: 24px;">水上桥区管控专题</div>
    <div class="content-container">
        <van-empty description="暂无数据" v-if="listImg.length == 0" />
      <div class="content" v-for="(item, index) in listImg" :key="index">
        <!-- <div class="title">温度统计 (℃)</div> -->
        <img
          :src="baseApi + item.url"
          @click="showImg(baseApi + item.url)"
          alt=""
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, nextTick } from "vue";
import { useRouter } from "vue-router";
const baseApi = `${import.meta.env.VITE_APP_BASE_API}`;
import { showImagePreview } from "vant";
const router = useRouter();
let listImg = ref([]);
const showImg = (url) => {
  showImagePreview({
    images: [url],
  });
};
onMounted(() => {
  let query = router?.currentRoute?.value?.query?.urlList;
  if (query) {
    listImg.value = JSON.parse(query);
  }
});
</script>

<style lang="scss" scoped>
::-webkit-scrollbar {
  display: none;
}

.BAC-title {
  width: 100%;
  font-size: 24px;
  line-height: 68px;
  background: rgba(49, 118, 233, 0.6);
  color: #fff;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  background: url("../../../static/images/bridgeAreaControl/bg_zhuanti.png")
    no-repeat;
  background-size: cover;
}
.scheme_container {
  .content-container {
    margin-top: 68px;
    width: 100%;
    height: calc(100vh - 68px);
    padding: 10px 20px 0;
    box-sizing: border-box;
    .content {
      background: #ffffff;
      box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.08);
      border-radius: 8px;
      margin-bottom: 16px;
      overflow: hidden;
      .title {
        display: flex;
        background: rgba(22, 93, 255, 0.05);
        height: 36px;
        color: #262626;
        padding: 0 8px;
        align-items: center;
        border-bottom: 1px solid #e6e6e6;
        font-size: 14px;
      }
      .echarts {
        height: 316px;
      }
      img {
        width: 100%;
        min-height: 200px;
      }
    }
  }
}
</style>
